﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using PlutoStudio.EntityFramework.Extensions;
using PlutoStudio.EntityFramework.Exceptions;
using System.ComponentModel.Composition;

namespace PlutoStudio.EntityFramework
{
    [Export(typeof(IUnitOfWork))]
    internal class DefaultUnitOfWorkContext : Primitives.UnitOfWorkContextBase
    {
        /// <summary>
        ///     获取 当前使用的数据访问上下文对象
        /// </summary>
        protected override DbContext Context
        {
            get
            {
                return EFDbContext;
            }
        }

        [Import]
        private DefaultContext EFDbContext { get; set; }
    }
}
